<?php 

	require "config.php";
	
	if($_GET['keresett'] != ""){
		
		$lekerdezes = "SELECT music.id, music.name, artists.username FROM music INNER JOIN artists ON music.artistid=artists.id WHERE music.name LIKE '%$_GET[keresett]%' OR artists.username LIKE '%$_GET[keresett]%'";
		$talalt = $conn->query($lekerdezes);
		while($zene=$talalt->fetch_assoc()){
			
			echo "<a href='music.php?musicid=$zene[id]'>$zene[username] - $zene[name]</a><br>";
			
		}
		
	}

?>